Skip to content
This repository has been archived by the owner on Aug 8, 2018. It is now read-only.

Makefiles support #35

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Makefiles support #35

wants to merge 7 commits into from

Conversation

spleshka
Copy link
Member

@spleshka spleshka commented Apr 3, 2018

Resolves #6

Makefile Outdated
$(shell ! test -e \.\/docker\/docker-compose\.override\.yml && cat \.\/docker\/docker-compose\.override\.default\.yml > \.\/docker\/docker-compose\.override\.yml)

# Create a .env file if not exists and include default env variables.
$(shell ! test -e \.env && cat \.env.default > \.env)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cp -n should be enough here, it will only copy if file doesn't exist

Makefile Outdated
fi
@if [ "$(COMMAND)" = "update" ]; then\
$(MAKE) -s falcon-update;\
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like broken indentation ^^

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Makefile Outdated
$(eval ARGS := $(filter-out $@,$(MAKECMDGOALS)))
@echo Target is \"$(firstword $(ARGS))\"
@echo Executing \"shell $(filter-out $(firstword $(ARGS)), $(ARGS))\"
$(call php, $(filter $(firstword $(ARGS)), $(ARGS)) $(filter-out $(firstword $(ARGS)), $(ARGS)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need $(filter) here? Can it be simplified to just $(call php, $(firstword $(ARGS)) $(filter-out $(firstword $(ARGS)), $(ARGS)))?

Makefile Outdated
@echo "############################"

@echo "Installing yarn dependencies for Gifts Frontend..."
@docker-compose run --no-deps fe_gifts yarn install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use docker-compose run - it creates new instance of the container with all the volumes etc. and just dies after command execution (but leaving the orphaned container with volumes etc.). let's start all the containers and then execute commands with docker-compose exec

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, that was the point of this command here. If you start a node.js container it will autoamtically execute 'yarn install' inside of it and therefore you won't be able to track the packages installation progress.

127.0.0.1 gifts.api.flc.local
127.0.0.1 pma.gifts.api.flc.local
127.0.0.1 donations.api.flc.local
127.0.0.1 pma.donations.api.flc.local
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be just a single line with all the hosts.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can be, but it is harder to track / add new hosts.

PHP_XDEBUG_DEFAULT_ENABLE: 1
# PHP_XDEBUG_REMOTE_CONNECT_BACK: 0
# PHP_IDE_CONFIG: serverName=phpstorm
PHP_XDEBUG_REMOTE_HOST: 172.17.0.1 # Linux
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't guarantee that this IP address will be used (it depends what IP ranges are available on host OS). Ideally, it should work without specifying this var by using the X-Forwarded-For header - I believe Kate was working to pass it correctly.

environment:
## Read instructions at https://wodby.com/stacks/drupal/docs/local/xdebug/
PHP_XDEBUG: 1
PHP_XDEBUG_DEFAULT_ENABLE: 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one also shouldn't be enabled by default. We should make it so that the xdebug cookie makes its way to the backends (if possible).

kalabro pushed a commit that referenced this pull request Apr 19, 2018
[#155932196] Fixed sorting of main menu items - added sorting by title.
@duozersk duozersk force-pushed the makefiles branch 5 times, most recently from dbad024 to 936e649 Compare June 8, 2018 14:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants